home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 18 / Silicon_Graphics_hot mix 18.iso / .bin / showmess < prev    next >
Text File  |  1997-11-04  |  427b  |  23 lines

  1. #!/bin/sh
  2.  
  3. # Get the time
  4. timesecs="$1"
  5.  
  6. # Make sure the arguments look right
  7. if [ $# -lt "3" -o "$timesecs" -le 0 ]; then
  8.     echo "usage: showmess timesecs xconfirm-messages"
  9.     if [ "$timesecs" -le 0 ]; then
  10.         echo "the timesecs parameter must be a positive number!"
  11.     fi
  12.     exit 1
  13. fi
  14.  
  15. # Shift away the time
  16. shift
  17.  
  18. # Post the xconfirm
  19. xconfirm "$@" >/dev/null 2>&1 &
  20. procid="$!"
  21.  
  22. (sleep $timesecs; kill -9 $procid 2>&1) > /dev/null
  23.